REM My INSIDER.BAT.  Docs and info to come later.
REM NEW VERSION!!!!!
REM By: Steve Phillips
REM Date Created: 02/20/09
REM Date Modified 03/31/09
REM Version: 1.0

SETLOCAL
@ECHO OFF
CLS

SET infilepath=%1
SET outfilename=%infilepath:~14,8%.ctl
SET subj=%2
SET acct=%3
SET type=%4 REM NOT USED RIGHT NOW
SET emto=%5;%6;%7;%8;%9

p:
cd \reports\%acct%

ECHO At %TIME% The Process For Running %acct% Started.  Please Wait

echo TO:%emto% > %outfilename%
echo SUBJ:%subj% >> %outfilename%

FOR /F "eol=; tokens=* delims=, " %%i in (%1) do (
    IF NOT "%%i"=="" (
    ECHO MSG:%%i >> %outfilename%))
   
COPY %outfilename% p:\mapi\%outfilename%
DEL %outfilename%
DEL %1

ENDLOCAL 